package xx;


import java.io.IOException;
import java.util.HashSet;
import java.util.Set;



public class CountryCreator {

	final static String remove = "AFN, ALL, AMD, AOA, AWG, AZN, BAM, BBD, BDT, BIF, BMD, BSD, BTN, BYR, BZD, CDF, COP, CUC, CUP, CVE, DJF, ERN, ETB, FKP, GEL, GGP, GHS, GIP, GMD, GNF, GTQ, GYD, HTG, IDR, IMP, IQD, IRR, ISK, JEP, KGS, KHR, KMF, KPW, KRW, LAK, LBP, LRD, LSL, LYD, MGA, MMK, MNT, MOP, MRO, MVR, MWK, MZN, PAB, PYG, RWF, SBD, SDG, SHP, SLL, SOS, SPL, SRD, STD, SYP, SZL, TJS, TMT, TOP, TVD, TZS, UGX, UZS, VND, VUV, WST, XAF, XCD, XDR, XOF, XPF, ZMK, ZWD";
	
	public static void main(String[] args) throws IOException {
	
		String[] removeArray = remove.split(",");
		Set<String> removeSet = new HashSet<String>();
		
		for(String s:removeArray){
			removeSet.add(s.trim());
		}
		
		
		LMFileReader reader = new LMFileReader("c:/temp/currency.txt");
		LMFileWriter writer = new LMFileWriter("c:/temp/result.xt");
		String line = reader.readLine();
		
		while(line != null){
			String code = line.substring(0, 3);
			String name = line.substring(3);
			if(!removeSet.contains(code)){
				writer.writeln(code+"(\""+code+"\",\""+name.trim()+"\"),");
			}
			line = reader.readLine();
		}
		writer.close();
		
	}
}
